package lab02.test28;
import java.util.InputMismatchException;
import java.util.Scanner;
public class Test28 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入园的半径：");
        double radius = 0;
        try {
            radius = scanner.nextDouble();
        }catch (InputMismatchException e){
            e.printStackTrace();//打印异常信息
            System.out.println("输入错误，请输入double型数据！！！");
        }finally {
            //System.out.println("输入异常！！！");
            double area = radius * radius * 3.14;
            System.out.println("圆的面积为：" + area);
        }
    }
}
